﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VietThinks.Model;
using FluentNHibernate.Mapping;

namespace VietThinks.Mapping.Maps
{
    public class ImmutableDomainEntityMap<TDomainEntity> : ClassMap<TDomainEntity>
        where TDomainEntity : DomainEntity<int>
    {
        protected ImmutableDomainEntityMap()
        {
            ReadOnly();
            Id(e => e.Id).GeneratedBy.Identity().UnsavedValue(0);
        }
    }
}
